# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=maui
pkgname=mauiman
pkgver=3.0.2
pkgrel=0
pkgdesc="Maui Manager Library, Server and Library"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://mauikit.org/"
license="GPL-2.0-or-later"
depends="kirigami2"
depends_dev="
	$pkgname=$pkgver-r$pkgrel
	qt5-qtbase-dev
	qt5-qtsystems-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	samurai
	"
_repo_url="https://invent.kde.org/maui/mauiman.git"
source="https://download.kde.org/stable/maui/mauiman/$pkgver/mauiman-$pkgver.tar.xz"
subpackages="$pkgname-dev"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
b31639d1ab6061e338d788782ff1b3eeffc79e4763c56e3c0f6265087d9e2465732702651d2502603c0745a832c048eef2a641b50c5bbf650935ad5341245c5f  mauiman-3.0.2.tar.xz
"
